/*
* Copyright (c) 2020 - 2025 Renesas Electronics Corporation and/or its affiliates
*
* SPDX-License-Identifier: BSD-3-Clause
*/

/***********************************************************************************************************************
 * Includes
 **********************************************************************************************************************/
#include "r_rsip_primitive.h"
#include "r_rsip_util.h"

/***********************************************************************************************************************
 * Global variables
 **********************************************************************************************************************/

uint32_t         S_RAM[RSIP_PRV_WORD_SIZE_S_RAM];
uint32_t         S_HEAP[RSIP_PRV_WORD_SIZE_S_HEAP];
uint32_t         S_INST[RSIP_PRV_WORD_SIZE_S_INST];
uint32_t const * S_INST2;

uint32_t const s_flash[] =
{
    BSWAP_32BIG_C(0x1737a60cU), BSWAP_32BIG_C(0x286e4cc2U), BSWAP_32BIG_C(0xa4d84363U), BSWAP_32BIG_C(0xaa2c3349U),
    BSWAP_32BIG_C(0x48c0d674U), BSWAP_32BIG_C(0xa8311961U), BSWAP_32BIG_C(0x1895f096U), BSWAP_32BIG_C(0x835e3dcfU),
    BSWAP_32BIG_C(0x0e0af558U), BSWAP_32BIG_C(0xd119a112U), BSWAP_32BIG_C(0xad0abfeeU), BSWAP_32BIG_C(0xa4cf2026U),
    BSWAP_32BIG_C(0xccfd3be1U), BSWAP_32BIG_C(0x89f38779U), BSWAP_32BIG_C(0x969b35caU), BSWAP_32BIG_C(0x1d31bef3U),
    BSWAP_32BIG_C(0xe0dece52U), BSWAP_32BIG_C(0xcfc0d0c0U), BSWAP_32BIG_C(0xa68b638cU), BSWAP_32BIG_C(0xe7ad19d9U),
    BSWAP_32BIG_C(0x392431b6U), BSWAP_32BIG_C(0xc1374145U), BSWAP_32BIG_C(0xad03e41aU), BSWAP_32BIG_C(0x319f0bf8U),
    BSWAP_32BIG_C(0x09e7fea4U), BSWAP_32BIG_C(0x0c8129d3U), BSWAP_32BIG_C(0x1688b34fU), BSWAP_32BIG_C(0xc19ddb49U),
    BSWAP_32BIG_C(0x38f12328U), BSWAP_32BIG_C(0x3309eab2U), BSWAP_32BIG_C(0x0146a7a9U), BSWAP_32BIG_C(0xfbb07eb3U),
    BSWAP_32BIG_C(0x7dfc400cU), BSWAP_32BIG_C(0xbd84cf2aU), BSWAP_32BIG_C(0xd1c70005U), BSWAP_32BIG_C(0x63da8baaU),
    BSWAP_32BIG_C(0xd62a5435U), BSWAP_32BIG_C(0x065389c1U), BSWAP_32BIG_C(0xbe5c911aU), BSWAP_32BIG_C(0xd3f5bf9fU),
    BSWAP_32BIG_C(0x4ccdafa8U), BSWAP_32BIG_C(0xfa951b3cU), BSWAP_32BIG_C(0xdd7e02dcU), BSWAP_32BIG_C(0x447bd8f0U),
    BSWAP_32BIG_C(0xc06bd438U), BSWAP_32BIG_C(0x641eddb6U), BSWAP_32BIG_C(0x34892b27U), BSWAP_32BIG_C(0xf155ccb2U),
    BSWAP_32BIG_C(0x1b0560c7U), BSWAP_32BIG_C(0xe18466b2U), BSWAP_32BIG_C(0x1aa5d0e9U), BSWAP_32BIG_C(0x050d8e22U),
    BSWAP_32BIG_C(0x9ef1e0a4U), BSWAP_32BIG_C(0x133b44bdU), BSWAP_32BIG_C(0x1650d3b6U), BSWAP_32BIG_C(0xa8421c35U),
    BSWAP_32BIG_C(0xf34e8ed2U), BSWAP_32BIG_C(0xd36158daU), BSWAP_32BIG_C(0x29140092U), BSWAP_32BIG_C(0x97878f27U),
    BSWAP_32BIG_C(0x5dc29b7dU), BSWAP_32BIG_C(0xd83ce4c9U), BSWAP_32BIG_C(0x8cad12eeU), BSWAP_32BIG_C(0xaf214af2U),
    BSWAP_32BIG_C(0x4d693653U), BSWAP_32BIG_C(0x7df5b916U), BSWAP_32BIG_C(0xf6dc55cfU), BSWAP_32BIG_C(0xff0e69e9U),
    BSWAP_32BIG_C(0x0c114c66U), BSWAP_32BIG_C(0xc42d5eadU), BSWAP_32BIG_C(0x489cfdf9U), BSWAP_32BIG_C(0xadcb3513U),
    BSWAP_32BIG_C(0x1ed2bb3dU), BSWAP_32BIG_C(0x90156baeU), BSWAP_32BIG_C(0xfc421fd1U), BSWAP_32BIG_C(0xe5f2a0f2U),
    BSWAP_32BIG_C(0xff238f71U), BSWAP_32BIG_C(0xc7811e48U), BSWAP_32BIG_C(0xf994e0f2U), BSWAP_32BIG_C(0x9166a269U),
    BSWAP_32BIG_C(0x2af02731U), BSWAP_32BIG_C(0xad22a570U), BSWAP_32BIG_C(0x81eaedf1U), BSWAP_32BIG_C(0x6d2a9692U),
    BSWAP_32BIG_C(0x333057d6U), BSWAP_32BIG_C(0xe95d6f3cU), BSWAP_32BIG_C(0x6564dd95U), BSWAP_32BIG_C(0x7cd1d3abU),
    BSWAP_32BIG_C(0x1653bdcbU), BSWAP_32BIG_C(0x50d8fcf6U), BSWAP_32BIG_C(0x0b3f039cU), BSWAP_32BIG_C(0xada06f02U),
    BSWAP_32BIG_C(0xc6f23515U), BSWAP_32BIG_C(0xcc2984f2U), BSWAP_32BIG_C(0x8cb0e29fU), BSWAP_32BIG_C(0xab91c9bbU),
    BSWAP_32BIG_C(0x4a571996U), BSWAP_32BIG_C(0x8e16c732U), BSWAP_32BIG_C(0x358687fbU), BSWAP_32BIG_C(0xea8e1fdfU),
    BSWAP_32BIG_C(0xf50ef495U), BSWAP_32BIG_C(0x4feb17c0U), BSWAP_32BIG_C(0x4593173bU), BSWAP_32BIG_C(0xdc0bb554U),
    BSWAP_32BIG_C(0x447e05b4U), BSWAP_32BIG_C(0x533908a5U), BSWAP_32BIG_C(0x310e1cdbU), BSWAP_32BIG_C(0xc9195546U),
    BSWAP_32BIG_C(0xc8cbe396U), BSWAP_32BIG_C(0x5118feebU), BSWAP_32BIG_C(0x0cba42f1U), BSWAP_32BIG_C(0x6e8ddbbbU),
    BSWAP_32BIG_C(0x0fd8adc6U), BSWAP_32BIG_C(0xf1a5705cU), BSWAP_32BIG_C(0x040f89eeU), BSWAP_32BIG_C(0xea642253U),
    BSWAP_32BIG_C(0x3c48190fU), BSWAP_32BIG_C(0x395bc773U), BSWAP_32BIG_C(0x9f60fd52U), BSWAP_32BIG_C(0x3eb8263fU),
    BSWAP_32BIG_C(0x8b79f8b3U), BSWAP_32BIG_C(0x93726787U), BSWAP_32BIG_C(0x0aaf07c2U), BSWAP_32BIG_C(0x6e5ad3eeU),
    BSWAP_32BIG_C(0xf5952b18U), BSWAP_32BIG_C(0x3b2c4d13U), BSWAP_32BIG_C(0x5a62e28fU), BSWAP_32BIG_C(0x35d61dddU),
    BSWAP_32BIG_C(0x1e8acc3bU), BSWAP_32BIG_C(0xcdc1a908U), BSWAP_32BIG_C(0x1d3350c1U), BSWAP_32BIG_C(0xf979d77eU),
    BSWAP_32BIG_C(0x205debf7U), BSWAP_32BIG_C(0xbe964bc5U), BSWAP_32BIG_C(0xd766b670U), BSWAP_32BIG_C(0x89e70efaU),
    BSWAP_32BIG_C(0x609e0032U), BSWAP_32BIG_C(0x7cb2f28aU), BSWAP_32BIG_C(0xc042c5bfU), BSWAP_32BIG_C(0x17c34a6eU),
    BSWAP_32BIG_C(0x07858189U), BSWAP_32BIG_C(0xfa444eb3U), BSWAP_32BIG_C(0xa549503aU), BSWAP_32BIG_C(0xaa270a96U),
    BSWAP_32BIG_C(0xc1df03c2U), BSWAP_32BIG_C(0x766bb892U), BSWAP_32BIG_C(0xc5d236b4U), BSWAP_32BIG_C(0x7e31ec49U),
    BSWAP_32BIG_C(0x6636db50U), BSWAP_32BIG_C(0x9878e416U), BSWAP_32BIG_C(0x9d153edaU), BSWAP_32BIG_C(0xb8bc3ed1U),
    BSWAP_32BIG_C(0x8f48f664U), BSWAP_32BIG_C(0x796e9a60U), BSWAP_32BIG_C(0x6fdd6a8bU), BSWAP_32BIG_C(0x7c0bce38U),
    BSWAP_32BIG_C(0x8e9a6c33U), BSWAP_32BIG_C(0x6420f257U), BSWAP_32BIG_C(0xd55af8ceU), BSWAP_32BIG_C(0x887a4465U),
    BSWAP_32BIG_C(0xc8d2ef60U), BSWAP_32BIG_C(0xf0e535f7U), BSWAP_32BIG_C(0x69c73887U), BSWAP_32BIG_C(0x28236470U),
    BSWAP_32BIG_C(0x56853e5aU), BSWAP_32BIG_C(0xcf0be1e5U), BSWAP_32BIG_C(0x24658617U), BSWAP_32BIG_C(0x3c03c4b0U),
    BSWAP_32BIG_C(0x3c964ac1U), BSWAP_32BIG_C(0x4454e76dU), BSWAP_32BIG_C(0x7060ce2dU), BSWAP_32BIG_C(0x4e5fdfc7U),
    BSWAP_32BIG_C(0xb7eaa6e2U), BSWAP_32BIG_C(0x21397566U), BSWAP_32BIG_C(0x57d7d7dcU), BSWAP_32BIG_C(0x7384d887U),
    BSWAP_32BIG_C(0xb2dcc2f8U), BSWAP_32BIG_C(0x4d963a2aU), BSWAP_32BIG_C(0x5c088cabU), BSWAP_32BIG_C(0xf9c62cedU),
    BSWAP_32BIG_C(0xd62a0c67U), BSWAP_32BIG_C(0xd4e6f0e0U), BSWAP_32BIG_C(0xcf9a4944U), BSWAP_32BIG_C(0x61d099abU),
    BSWAP_32BIG_C(0x2d4afbc4U), BSWAP_32BIG_C(0x9262bbcdU), BSWAP_32BIG_C(0xf9ca90b4U), BSWAP_32BIG_C(0x4617eb7cU),
    BSWAP_32BIG_C(0x54ee5ab3U), BSWAP_32BIG_C(0x20e86d8aU), BSWAP_32BIG_C(0xc246b077U), BSWAP_32BIG_C(0x99c2ff8cU),
    BSWAP_32BIG_C(0x4dcf4325U), BSWAP_32BIG_C(0x116ddb86U), BSWAP_32BIG_C(0x20678b38U), BSWAP_32BIG_C(0x1d7a79b7U),
    BSWAP_32BIG_C(0x326080d1U), BSWAP_32BIG_C(0x36e373d4U), BSWAP_32BIG_C(0x3f9af6afU), BSWAP_32BIG_C(0x05b566d3U),
    BSWAP_32BIG_C(0x37f8419aU), BSWAP_32BIG_C(0x697fb077U), BSWAP_32BIG_C(0x617f9946U), BSWAP_32BIG_C(0x7b9a165fU),
    BSWAP_32BIG_C(0xebb7e21fU), BSWAP_32BIG_C(0x41ff0c1dU), BSWAP_32BIG_C(0xe4d3073cU), BSWAP_32BIG_C(0x774da5a4U),
    BSWAP_32BIG_C(0xa4796137U), BSWAP_32BIG_C(0xdae6a5c9U), BSWAP_32BIG_C(0x6ab01e3dU), BSWAP_32BIG_C(0x314bb8a9U),
    BSWAP_32BIG_C(0x6ff559b8U), BSWAP_32BIG_C(0x57face1cU), BSWAP_32BIG_C(0xa82538c9U), BSWAP_32BIG_C(0xd41f517eU),
    BSWAP_32BIG_C(0xcc8de916U), BSWAP_32BIG_C(0xcee6b5ccU), BSWAP_32BIG_C(0x30b5c918U), BSWAP_32BIG_C(0x70e73c54U),
    BSWAP_32BIG_C(0xac610429U), BSWAP_32BIG_C(0x7d966481U), BSWAP_32BIG_C(0x15f8997eU), BSWAP_32BIG_C(0x3182d542U),
    BSWAP_32BIG_C(0xca531f7cU), BSWAP_32BIG_C(0x0bf7c5ebU), BSWAP_32BIG_C(0x98718aa3U), BSWAP_32BIG_C(0x88071260U),
    BSWAP_32BIG_C(0xdcaef022U), BSWAP_32BIG_C(0x0b7236b0U), BSWAP_32BIG_C(0xa2e055d8U), BSWAP_32BIG_C(0xd458427dU),
    BSWAP_32BIG_C(0x5ff39948U), BSWAP_32BIG_C(0xbd83102bU), BSWAP_32BIG_C(0x093361d4U), BSWAP_32BIG_C(0xa0e9a52fU),
    BSWAP_32BIG_C(0x956d52c7U), BSWAP_32BIG_C(0xe190e251U), BSWAP_32BIG_C(0x95160767U), BSWAP_32BIG_C(0x4117f564U),
    BSWAP_32BIG_C(0xf672928eU), BSWAP_32BIG_C(0x4af75d72U), BSWAP_32BIG_C(0x7b3835bcU), BSWAP_32BIG_C(0xde524ce7U),
    BSWAP_32BIG_C(0x4c34ccecU), BSWAP_32BIG_C(0xa1aa77c8U), BSWAP_32BIG_C(0xae1899e1U), BSWAP_32BIG_C(0x419e6769U),
    BSWAP_32BIG_C(0x40ae7c27U), BSWAP_32BIG_C(0xb32fa645U), BSWAP_32BIG_C(0x6b18778eU), BSWAP_32BIG_C(0x0f22b24fU),
    BSWAP_32BIG_C(0xb047d734U), BSWAP_32BIG_C(0x3c478087U), BSWAP_32BIG_C(0xedb59206U), BSWAP_32BIG_C(0x34bbeeddU),
    BSWAP_32BIG_C(0x273e864aU), BSWAP_32BIG_C(0xc0a85dedU), BSWAP_32BIG_C(0x06c8d1a8U), BSWAP_32BIG_C(0x5981e22bU),
    BSWAP_32BIG_C(0xe7456597U), BSWAP_32BIG_C(0x5f49b849U), BSWAP_32BIG_C(0x8154cb2bU), BSWAP_32BIG_C(0xf239bd5fU),
    BSWAP_32BIG_C(0xda012175U), BSWAP_32BIG_C(0x52b4a093U), BSWAP_32BIG_C(0xf22213b3U), BSWAP_32BIG_C(0x62c467c4U),
    BSWAP_32BIG_C(0x9a98eff9U), BSWAP_32BIG_C(0x060f7fedU), BSWAP_32BIG_C(0xfb5573ceU), BSWAP_32BIG_C(0x0946b20aU),
    BSWAP_32BIG_C(0xa34f9931U), BSWAP_32BIG_C(0x9472003cU), BSWAP_32BIG_C(0xa01e3646U), BSWAP_32BIG_C(0x3f389189U),
    BSWAP_32BIG_C(0x5ed736c1U), BSWAP_32BIG_C(0x4ff788eaU), BSWAP_32BIG_C(0x37066041U), BSWAP_32BIG_C(0x91bf26daU),
    BSWAP_32BIG_C(0x60861a67U), BSWAP_32BIG_C(0x03cdde91U), BSWAP_32BIG_C(0xf9562c79U), BSWAP_32BIG_C(0xc58048d8U),
    BSWAP_32BIG_C(0xcfc38394U), BSWAP_32BIG_C(0x9138ca2cU), BSWAP_32BIG_C(0x81fd9da9U), BSWAP_32BIG_C(0xcc09d3ecU),
};
